Sprintf
Edit entry
编辑词条 -->
The string formatting command is mainly used to write formatted data into a string. Sprintf is a variable parameter function, which often causes problems when used, and as long as there is a problem,
Printf may be the second function that many programmers encounter when learning C language (I guess the first function is main). It is naturally an old friend. However, do you know much about this old friend? Do you know more about sprintf? When
printf is probably the second function that many programmers come into contact with when they start learning C (I guess the first one is main), but it's an old friend, but do you know much about this old friend? Do you know much about his twin
Selected "CSDN Community e-magazine--c/c++ magazine"Http://emag.csdn.net January 2005 Issue 1-93-Author: steedhorse (Morningstar)printf is probably the second function that many program apes come into contact with when they start learning C (I guess
Sprintf usage
Printf may be the second function that many programmers encounter when learning C language (I guess the first function is main ),Naturally, it's an old friend. But do you know more about this old friend? You know more about sprintf.?
From csdn Community Electronic Magazine-C/C ++ magazineHttp://emag.csdn.net January 2005 total period 1st-93-Author: steedhorse (Morning Star)Printf may be the second function that many programmers encounter when learning C language (I guess the
From csdn Community Electronic Magazine-C/C ++ magazineHttp://emag.csdn.net January 2005 total period 1st-93-This article steedhorse (Morning Star)Printf may be the second function that many programmers encounter when learning C language (I guess
This article illustrates the difference between the methods used by sprintf in C + + and printf. Share to everyone for your reference. The specific analysis is as follows:
First, we'll look at the MSDN prototype and the sprintf prototype
Copy
The first parameter required by wsprintf is lptstr. if the environment is Unicode, lptstr is equivalent to wchar_t *, which is a wide character pointer and char * in a non-Unicode environment *.
The function for formatting strings is as follows.
Sprintf () format the output function (image)Function: sprintf () is used for formatting output.Usage: This function is called in int sprintf (char * string, char * format, arg_list );Note: The usage of the sprintf () function is the same as that of
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.